home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Electronics Plus 3
/
PC Electronics Plus 3.iso
/
pads
/
psheader.dat
< prev
next >
Wrap
Text File
|
1992-04-30
|
10KB
|
468 lines
%!PS-Adobe-2.0
%%Title: PADS Postscript Driver Header
%%Creator: Andy Montalvo, 18 Lupine St., Lowell, MA 01851
%%CreationDate: 06/08/90
%%For: CAD Software, Littleton, MA
%%EndComments
%%BeginProcSet: Markers 1.0 0
% marker attributes
/MAttr_Width 1 def
/MAttr_Size 0 def
/MAttr_Type /M1 def
% procedures
/M1 { %def
% draw marker 1: plus
% Stack: - M1 -
-2 0 rmoveto
4 0 rlineto
-2 2 rmoveto
0 -4 rlineto
} bind def
/M2 { %def
% draw marker 2: cross
% Stack: - M2 -
-2 -2 rmoveto
4 4 rlineto
-4 0 rmoveto
4 -4 rlineto
} bind def
/M3 { %def
% draw marker 3: square
% Stack: - M3 -
0 2 rlineto
2 0 rlineto
0 -4 rlineto
-4 0 rlineto
0 4 rlineto
2 0 rlineto
} bind def
/M4 { %def
% draw marker 4: diamond
% Stack: - M4 -
0 2 rlineto
2 -2 rlineto
-2 -2 rlineto
-2 2 rlineto
2 2 rlineto
} bind def
/M5 { %def
% draw marker 5: hourglass
% Stack: - M5 -
2 2 rlineto
-4 0 rlineto
4 -4 rlineto
-4 0 rlineto
2 2 rlineto
} bind def
/M6 { %def
% draw marker 6: bowtie
% Stack: - M6 -
2 2 rlineto
0 -4 rlineto
-4 4 rlineto
0 -4 rlineto
2 2 rlineto
} bind def
/M7 { %def
% draw marker 7: plus (goes with char marker)
% Stack: - M7 -
-2 0 rmoveto
4 0 rlineto
-2 2 rmoveto
0 -4 rlineto
} bind def
/Marker { %def
% Command from driver: draw marker
% STACK: x y Marker -
MAttr_Size 0 gt
{
gsave
moveto
MAttr_Size 4 div dup scale
MAttr_Type load exec
4 MAttr_Size div dup scale
MAttr_Width setlinewidth
stroke
grestore
} if
} def
%%EndProcSet: Markers 1.0 0
%%BeginProcSet: Lib 1.0 0
/sg { %def
% Command from driver: set the gray scale 0 - 100
% STACK: greylevel sg
100 div dup setgray /glev exch def
} bind def
/Circle { %def
% draw a circle
% STACK: x y radius Circle -
0 360 arc
} bind def
/RndAper { %def
% select a round aperture
% STACK: - RndAper -
1 setlinejoin
1 setlinecap
} bind def
/SqrAper { %def
% select a square aperture
% STACK: - SqrAper -
0 setlinejoin
2 setlinecap
} bind def
/Line { %def
% draw a set of connected lines
% STACK: x1 y1 [ x2 y2 ... xn yn ] Line -
3 1 roll
moveto
true
exch
% This pushes the x then the y then does lineto
{ exch { false } { lineto true } ifelse } forall
pop
} bind def
/Clipto { %def
% set clipping rectangle from 0,0 to new values
% STACK: x y Clipto -
0 0 moveto
dup 0 exch lineto
2 copy lineto
pop
0 lineto
closepath
clip
newpath
} bind def
/Clip4 { %def
% set clipping rectangle from xmin,ymin to xmax,ymax
% STACK: xmin ymin xmax ymax Clip4 -
4 copy pop pop moveto
4 copy pop exch lineto pop
2 copy lineto
exch pop exch pop lineto
closepath
clip
newpath
} bind def
%%EndProcSet: Lib 1.0 0
%%BeginProcSet: Lines 1.0 0
% line attributes %
/LAttr_Width 1 def
% line procedures
/PLine { %def
% Cammand from driver: draw a set of connected lines
% STACK: x1 y1 [ x2 y2 ... xn yn ] PLine -
Line
LAttr_Width setlinewidth
stroke
} bind def % PLine
/Char { %def
% Command from driver: draw a character at the current position
% STACK: type x y stroke_array Char -
% stroke array -- [ stroke1 stroke2 ... stroken ]
% stroke -- connected staight lines
% type = 0 if text 1 if marker
gsave
4 1 roll
translate
0 eq { TAttr_Width } { MAttr_Width } ifelse setlinewidth
{
dup length 2 gt
{
dup dup 0 get exch 1 get % get starting point
3 -1 roll % put x y before array
dup length 2 sub 2 exch getinterval % delete first items from array
Line
stroke
}
{
aload pop currentlinewidth 2 div Circle fill
} ifelse
} forall
grestore
} bind def % Char
/PArc { %def
% Command from driver: draw an arc
% STACK: x y radius startangle deltaangle Arc -
10 div exch 10 div exch
2 copy pop add
arc
LAttr_Width setlinewidth
stroke
} bind def
/PCircle { %def
% Command from driver: draw an circle
% STACK: x y radius PCircle -
Circle
LAttr_Width setlinewidth
stroke
} bind def
%%EndProcSet: Lines 1.0 0
%%BeginProcSet: Polygon 1.0 0
% polygon attributes %
/PAttr_ExtWidth 1 def
/PAttr_IntWidth 1 def
/PAttr_Grid 1 def
% polygon procedures
/LoopSet { %def
% set up for loop condition
% STACK: start end LoopSet low gridwidth high
2 copy lt { exch } if
% make grid line up to absolute coordinates
PAttr_Grid div truncate PAttr_Grid mul exch
PAttr_Grid exch
} bind def
/Hatch { %def
% draw cross hatch pattern in current path
% STACK: - Hatch -
pathbbox
/ury exch def
/urx exch def
/lly exch def
/llx exch def
clip
newpath
llx urx LoopSet
{ % x loop
dup lly exch ury moveto lineto
} for
lly ury LoopSet
{ % y loop
llx exch dup urx exch moveto lineto
} for
PAttr_IntWidth setlinewidth
stroke
} bind def
/PPoly { %def
% Command from driver: draw a polygon
% STACK: x1 y1 [ x2 y2 ... xn yn ] PLine -
Line
closepath
gsave
PAttr_IntWidth PAttr_Grid ge {fill} {Hatch} ifelse
grestore
PAttr_ExtWidth setlinewidth
stroke
} bind def
/DPoly { %def
% Command from driver: draw a polygon defined by current path
% STACK: - DPoly -
closepath
gsave
PAttr_IntWidth PAttr_Grid ge {fill} {Hatch} ifelse
grestore
PAttr_ExtWidth setlinewidth
stroke
} bind def
%%EndProcSet: Polygon 1.0 0
%%BeginProcSet: Text 1.0 0
% text attributes %
/TAttr_Mirr 0 def
/TAttr_Orient 0 def
/TAttr_Width 1 def
% text procedures
/Text { %def
% Command from driver: Draw text
% STACK: x y width string Text -
gsave
4 2 roll
translate
TAttr_Mirr 0 gt
{
-1 1 scale
} if
TAttr_Orient rotate
0 0 moveto
dup length dup 1 gt
{
exch dup stringwidth pop
4 -1 roll
exch 2 copy
lt
{
div 1 scale show
pop
}
{
sub
3 -1 roll 1 sub div
0 3 -1 roll ashow
}
ifelse
}
{
pop
show
pop
} ifelse
grestore
} bind def
%%EndProcSet: Text 1.0 0
%%BeginProcSet: FlashSymbols 1.0 0
% flash symbol attributes %
/FAttr_Type /PRndPad def
/FAttr_Width 0 def
/FAttr_Length 1 def
/FAttr_Orient 0 def
% flash symbol procedures
/PRndPad { %def
% Command from driver: draw an circular pad
% STACK: - PCirclePad -
FAttr_Width dup scale
0 0 .5 Circle
fill
} bind def
/PSqrPad { %def
% Draw an Square pad
% STACK: - PRectPad -
FAttr_Width dup scale
.5 .5 moveto
-.5 .5 lineto
-.5 -.5 lineto
.5 -.5 lineto
closepath
fill
} bind def
/PRectPad { %def
% Draw an rectangular pad
% STACK: - PRectPad -
FAttr_Length FAttr_Width scale
.5 .5 moveto
-.5 .5 lineto
-.5 -.5 lineto
.5 -.5 lineto
closepath
fill
} bind def
/POvalPad { %def
% Draw an oval pad
% STACK: - POvalPad -
FAttr_Width setlinewidth
FAttr_Length FAttr_Width sub 2 div dup
neg 0 moveto
0 lineto
RndAper
stroke
} bind def
/Anl { %def
0 0 .5 Circle
fill
FAttr_Length FAttr_Width lt
{ % inner circle
0 0
FAttr_Length 0 gt { FAttr_Length FAttr_Width div } { .5 } ifelse
2 div Circle
1 setgray
fill
glev setgray
} if
} bind def
/PAnlPad { %def
% Draw an annular pad
% STACK: - PAnlPad -
FAttr_Width dup scale
Anl
} bind def
/PRelPad { %def
% Draw an thermal relief pad
% STACK: - PRelPad -
PAnlPad
1 setgray
.17 setlinewidth
0 setlinecap % the x
45 rotate
.5 0 moveto -.5 0 lineto
0 .5 moveto 0 -.5 lineto
stroke
glev setgray
} bind def
/Flash { %def
% Command from driver: Flash a symbol
% STACK: x y Flash -
FAttr_Width 0 gt
{
gsave
translate
FAttr_Orient rotate
FAttr_Type load exec
grestore
} if
} def
%%EndProcSet: FlashSymbols 1.0 0
%%BeginProcSet: SetAttr 1.0 0
/SetLine { %def
% Set the width of the lines
% STACK: linewidth SetLine -
/LAttr_Width exch def
RndAper
} bind def
/SetPoly { %def
% Set attribute of polygon
% STACK: external_width internal_grid_width grid_spacing SetPoly -
/PAttr_Grid exch def
/PAttr_IntWidth exch def
/PAttr_ExtWidth exch def
RndAper
} bind def
/SetFlash { %def
% Set Attributed of flash pad
% STACK: orientation_angle length width aperture_type SetFlash -
/FAttr_Type exch def
FAttr_Type /PSqrPad eq FAttr_Type /PRectPad eq or
{ SqrAper } { RndAper } ifelse
/FAttr_Width exch def
/FAttr_Length exch def
/FAttr_Orient exch 10 div def
} bind def
/SetMkr { %def
% Set attributes of markers
% STACK: linewidth size type SetMkr -
/MAttr_Type exch def
/MAttr_Size exch def
/MAttr_Width exch def
RndAper
} bind def
/SetText1 { %def
% Set attributes of text
% STACK: fontname height orient mirror SetMkr -
/TAttr_Mirr exch def
/TAttr_Orient exch 10 div def
exch findfont exch scalefont setfont
RndAper
} bind def
/SetText2 { %def
% Set attributes of text
% STACK: linewidth height mirror orient SetMkr -
/TAttr_Width exch def
RndAper
} bind def
%%EndProcSet: SetAttr 1.0 0
%%BeginProcSet: Initialize 1.0 0
/Init { %def
% Initialize the driver
% STACK: Init -
72 1000 div dup scale % Scale to 1/1000 inch
250 250 translate % make origin 1/4 inch from bottom left
1.5 setmiterlimit 1 RndAper % set line defaults
0 setgray % set color default
/glev 0 def
} def
/VMSave { %def
% Save the current state of VM
% STACK: VMSave -
/VMState save def
} def
/VMRest { %def
% Restore the saved state of VM
% STACK: VMRest -
VMState restore
} def
/VMFlush { %def
% Flush accumulated junk in VM
% STACK: VMFlush -
VMRest
VMSave
} def
%%EndProcSet: Initialize 1.0 0
%%EndProlog